package com.pro.common.service.file.model.mapstruct;

import com.pro.common.api.depencies.config.CommonMappingConfig;
import com.pro.common.api.user.file.model.db.UserUploadRecord;
import com.pro.common.service.file.model.dto.FileUploadDTO;
import com.pro.common.service.file.model.dto.FileUploadTempDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import org.mapstruct.*;


@Schema(description = "预签名上传DTO")
@Mapper(
        componentModel = "spring",
        config = CommonMappingConfig.class,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE
)
public interface FileUploadDTOMapper {
    @InheritConfiguration(name = "ignoreBaseFields")
    void update(FileUploadDTO source, @MappingTarget FileUploadDTO target);
//    @InheritConfiguration(name = "ignoreBaseFields")
//    void update(FileUploadTempDTO source, @MappingTarget FileUploadTempDTO target);
    @InheritConfiguration(name = "ignoreBaseFields")
    void updateRecord(UserUploadRecord source, @MappingTarget UserUploadRecord target);
}
